<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <?php echo $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); ?>
    <?php echo $this->headTitle(); ?>
    <?php echo $this->headLink(); ?>
    <?php echo $this->headScript(); ?>
    <script type="text/javascript">
		tinymce.init({
            selector: "textarea",
            theme: "modern",
            width: 700,
            height: 300,
            plugins: [
                 "advlist autolink link image lists charmap print preview hr anchor pagebreak",
                 "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
                 "table contextmenu directionality emoticons paste textcolor responsivefilemanager"
           ],
           toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
           toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor  | print preview code ",
           image_advtab: true ,
		   removing_the_cleanup : false,
           
           external_filemanager_path:"/filemanager/",
           filemanager_title:"Responsive Filemanager" ,
           external_plugins: { "filemanager" : "/filemanager/plugin.min.js"}
        }); 
	
        $(document).ready(function() {
            $(".iframe").colorbox({iframe:true, width:"82%", height:"82%"});
            var mainmenu = $('#nav_menu > ul');
            var header = mainmenu.find('ul').parent();
            header.each(function(i) {
                $(this).hover(
                    function(e) {
                        $(this).children("ul:eq(0)").slideDown(200);
                    },
                    function(e) {
                        $(this).children("ul:eq(0)").slideUp(100);
                    }
                );
            });
            
            var controller = '<?php echo Zend_Controller_Front::getInstance()->getRequest()->getControllerName();?>'; 
            if(controller == 'index'){
              $('.home').addClass('active-menu');
            }
            else {
                if((controller == 'fashion') || (controller == 'furniture') || (controller == 'baby')){
            		$('.product').addClass('active-menu');
                }
                else if(controller == 'cart'){
                    $('.cart').addClass('active-menu');
                }
            	else if(controller == 'news'){
            		$('.news').addClass('active-menu');
            	}
            	else if(controller == 'evaluation'){
            		$('.evaluation').addClass('active-menu');
            	}
            	else if((controller == 'page') || (controller == 'slide')){
            		$('.setting').addClass('active-menu');
            	}
                else if(controller == 'user'){
            		$('.user').addClass('active-menu');
            	}
                else if(controller == 'support'){
            		$('.support').addClass('active-menu');
            	}
            }
        });
    </script>
</head>
<body>
<div class="container">
    <!-- Begin Header -->
    <div class="header">
        <div class="logo">
            <img src="<?php echo $this->baseUrl('/public/templates/admin/'); ?>images/logo.png" />
        </div>
        
        <?php 
        	$auth = Zend_Auth::getInstance();
        	$infoUser = $auth->getIdentity();
        ?>
        <div class="user_cp">
            <ul>
                <li>Chào mừng, <?php echo $infoUser->username; ?></li>
                <li><a href="<?php echo $this->baseUrl('admincp/user/profile'); ?>">Thông tin</a></li>
                <li><a href="<?php echo $this->baseUrl('admincp/index/logout'); ?>">Thoát</a></li>
            </ul>
        </div>
    </div>
    <!-- End Header -->
    
    <!-- Begin Nav -->
    <div class="nav" id="nav_menu">
        <ul>
            <li><a class="visit_site" target="_blank" href="<?php echo $this->baseUrl(''); ?>">Trang chủ</a></li>
            <li>
                <a class="control product" style="cursor: pointer;">Sản phẩm</a>
                <ul>
                    <li><a href="<?php echo $this->baseUrl('admincp/fashion'); ?>">Đồ thời trang xuất khẩu</a></li>
                    <li><a href="<?php echo $this->baseUrl('admincp/baby'); ?>">Đồ trẻ em</a></li>
                    <li><a href="<?php echo $this->baseUrl('admincp/furniture'); ?>">Đồ gia dụng</a></li>
                </ul>
            </li>
            <li><a href="<?php echo $this->baseUrl('admincp/cart'); ?>" class="control cart">Đơn hàng</a></li>
            <li><a href="<?php echo $this->baseUrl('admincp/news'); ?>" class="control news">Tin tức</a></li>
            <li><a href="<?php echo $this->baseUrl('admincp/evaluation'); ?>" class="control evaluation">Đánh giá</a></li>
            <!-- <li><a href="<?php echo $this->baseUrl('admincp/support'); ?>" class="control support">Hỗ trợ online</a></li> -->
            <li><a href="<?php echo $this->baseUrl('admincp/user'); ?>" class="user">Tài khoản</a></li>
            <li>
                <a class="control setting" style="cursor: pointer;">Cấu hình</a>
                <ul>
                    <li><a href="<?php echo $this->baseUrl('admincp/page'); ?>">Quản lý trang tĩnh</a></li>
                    <li><a href="<?php echo $this->baseUrl('admincp/slide'); ?>">Giao diện</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!-- End Nav -->
    
    <div class="sidebar">
        <div class="heading_sidebar">
            <span>Tùy chọn</span>
        </div>
    
        <?php echo $this->layout()->content; ?>
</div>

<!-- Begin Footer -->
<div class="footer">
    <span>Designed by Vinhbt. All Rights Reserved.</span>
</div>
<!-- End Footer -->
</body>
</html>